package com.lytxmd.boxtest.http;

import com.zhy.http.okhttp.OkHttpUtils;
import com.zhy.http.okhttp.request.RequestCall;

import java.util.Map;

/**
 * Created by zhangyinglong on 2017/5/16.
 */
public class HttpManager{
    public static RequestCall doGet(String url, Map<String,String> params){
        return OkHttpUtils.get()
                .params(params)
                .url(url)
                .build()
                .readTimeOut(30*1000)
                .connTimeOut(30*1000);
    }


    public static RequestCall doPost(String url, Map<String,String> params){
        return OkHttpUtils.post()
                .params(params)
                .url(url)
                .build()
                .readTimeOut(30*1000)
                .connTimeOut(30*1000);
    }
}
